package com.topc.others.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.topc.base.model.PageParams;
import com.topc.base.model.PageResult;
import com.topc.others.model.dto.SaveCompetitionComposeDto;
import com.topc.others.model.po.CompetitionUserMid;
import com.topc.others.model.vo.CompetitionApplyShowVo;

/**
 * <p>
 * 用户竞赛关系表 服务类
 * </p>
 *
 * @author itcast
 * @since 2024-01-22
 */
public interface ICompetitionUserMidService extends IService<CompetitionUserMid> {

    void saveUserInfo(SaveCompetitionComposeDto saveCompetitionComposeDto);

    void deleteUserInfoById(Long id, String userNumber);

    void updateApplyInfoById(Long id, String userNumber);

    PageResult<CompetitionApplyShowVo> getApplyInfoByPage(PageParams pageParams, Long id);

    String getApplyInfoByUserNumber(Long id, String number);

    boolean updateScore(String userNumber, Long competitionId, Integer score);

    void updateCompetitionFinished(Long id, String userNumber);
}
